1 IDENTIFICATION DIVISION
4 COMMENT A thin tube rotates at a constant angular velocity perpendicular to gravity
5 COMMENT A mass point moves frictionless in this tube. The differential equation gives the position of this mass point.
6 COMMENT r''=omega^2*r -g*sin(omega*t+phi0)
11 REQUIRES COEFFICIENT 8, INTEGRATOR 4, INVERTER 1, MULTIPLIER 2
19 COEFFICIENT.4 OMEGAS # same as OMEGAC
21 COEFFICIENT.6 R0 # r(0)
22 COEFFICIENT.7 V0 # r'(0)
23 COEFFICIENT.8 OMEGA^2 # = OMEGAC*OMEGAS
26 ### Generating sin(omega*t+phi0) ###
27 +1 -> COEFFICIENT.ICw’ -> icw’
28 -1 -> COEFFICIENT.ICw -> -icw
29 w’’, IC:icw’ -> INTEGRATOR -> -w’=-cos
30 -w' -> COEFFICIENT.OMEGAC -> -omega*w'
31 -omega*w', IC:-icw -> INTEGRATOR -> w=sin
32 w -> INVERTER -> -w=-sin
33 -w -> COEFFICIENT.OMEGAS -> -omega^2*w=w’’
35 ### the actual problem ###
36 -sin -> COEFFICIENT.G -> -g*sin
37 -1 -> COEFFICIENT.R0 -> -r0
38 +1 -> COEFFICIENT.V0 -> v0
39 omega^2*r, -g*sin,IC:v0 -> INTEGRATOR -> -r' # input is r''
40 -r',IC:-r0 -> INTEGRATOR -> r
41 r -> COEFFICIENT.OMEGA^2 -> omega^2*r
43 ### Converting r, phi to x,y coordinates for display ###
44 r, sin -> MULTIPLIER -> x
45 r, -cos -> MULTIPLIER -> y # y-axis shall go down according to gravity, thus negativ input